package main.java.design.composite;

/**
 * <p>
 *     叶子（Leaf）：叶子对象，叶子结点没有子结点。
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/16 20:34
 */
public class File implements Component {

    private String name;
    public File(String name) {
        this.name = name;
    }

    @Override
    public void display() {
        System.out.println("叶子节点，文件名:" + name);
    }

    @Override
    public void add(Component component) {

    }

    @Override
    public void remove(Component component) {

    }
}
